package sysu.el.array.ints.algors;
import sysu.el.array.ints.functors.Fun1IntI;


public class ArrMapInt {
	static public void apply(int arr_num, int[] arr, Fun1IntI fun){
		for (int i=0; i<arr_num; i++){
			arr[i] = fun.apply(arr[i]);
		}
	}
	
	public static void main(String argv[]){
		int a[] = {1, 2, 3, 4, 5};
		ArrMapInt.apply(5, a, Fun1IntI.inc1);
		
		for (int e : a){
			System.out.print(e + "\t");
		}
	}
}
